package com.scse.bms.service;

import com.scse.bms.mapper.UserRoleMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Title: UserRoleServiceImpl
 * @Author: 吴赠禹
 * @Date: 2020-12-09 下午 6:39
 * @Version: 1.0
 * @Description: 用户角色接口实现类
 */

@Slf4j
@Service("userRoleService")
@Transactional(rollbackFor = Exception.class)
public class UserRoleServiceImpl implements UserRoleService {

    @Autowired
    private UserRoleMapper mapper;

    @Override
    public int addAuthBe2(Integer userId) {
        log.info("[为用户设置权限] [用户ID]：" + userId);
        return mapper.insertToAuthBe2(userId);
    }
}
